﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Main.aspx.cs" Inherits="Admin_Main" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>深圳安盛宇电子有限公司系统平台</title>
    <link href="/Resources/Admin/main.css" rel="stylesheet" type="text/css" />

    <script src="/Resources/js/jquery-1.9.1.js"></script>

    <%--easyui--%>
    <link href="/Resources/js/jquery-easyui-1.4/themes/default/easyui.css" rel="stylesheet" />
    <link href="/Resources/js/jquery-easyui-1.4/themes/icon.css" rel="stylesheet" />
    <script src="/Resources/js/jquery-easyui-1.4/jquery.easyui.min.js"></script>
    <script src="/Resources/js/jquery-easyui-1.4/locale/easyui-lang-zh_CN.js"></script>

    <script type="text/javascript">

        function AddTabs(url, title) {
            if ($('#MainWindow').tabs('exists', title)) {
                $('#MainWindow').tabs('select', title);
            } else {
                $('#MainWindow').tabs('add', {
                    title: title,
                    content: '<iframe src="' + url + '" width="100%" height="100%" frameborder="0"></iframe>',
                    closable: true
                });
            }
        }
        function Logout() {
            $.messager.confirm('系统消息', '您确定退出系统吗？', function (r) {
                if (r) {
                    window.location.href = "Login/Logout.aspx";
                }
            });
        }

        function ModifyPassword() {
            $('#ModifyPassword').dialog({
                title: '修改密码',
                width: 400,
                height: 200,
                closed: false,
                cache: false,
                modal: true
            });
        }

        function AboutBangle() {
            $('#AboutBangle').dialog("open");
        }
    </script>
    <style>
        .main-tool {
            width: 400px;
            float: right;
            text-align: right;
            padding-right: 20px;
            padding-top: 8px;
        }

            .main-tool .user-info {
            }

            .main-tool .button {
                margin-top: 15px;
                font-size: 14px;
            }

                .main-tool .button a {
                    color: #fff;
                }

                    .main-tool .button a img {
                        margin-right:4px;
                        vertical-align:-3px;
                    }

                .main-tool .button span {
                    color: #fff;
                    margin: 0 5px;
                }
    </style>
</head>
<body class="easyui-layout">
    <form id="form1" runat="server">
        <div data-options="region:'north'" style="height: 60px; padding: 0; background-color: #8DB2E3; overflow: hidden;">
            <img src="/Resources/Images/ASYLOGO.png" />

            <div class="main-tool">
                <div class="user-info">
                    当前登录用户：
                    <span style="color: blue;">
                        <asp:Literal ID="labLoginUser" runat="server" Text=""></asp:Literal>
                    </span>
                    &nbsp;&nbsp;
                </div>
                <div class="button">
                    <a href="javascript:void(0)" onclick="ModifyPassword()">
                        <img src="../Resources/Images/password.png" />修改密码
                    </a>
                    <span>|</span>
                    <a href="javascript:void(0)" onclick="Logout()">
                        <img src="../Resources/Images/logout.png" />退出系统
                    </a>
                    <span>|</span>
                    <a href="javascript:void(0)" onclick="AboutBangle()">
                        <img src="../Resources/Images/about.png" />关于系统
                    </a>
                </div>
            </div>
        </div>
        <div data-options="region:'south'" style="height: 1px; background-color: #8DB2E3;">
        </div>
        <div data-options="region:'west'" title="系统菜单" style="width: 220px; padding: 0px; overflow: hidden;">
            <div id="Menu" class="easyui-accordion" data-options="fit:true,border:false">
                <%--循环目录--%>
                <%foreach (Bangle.Model.Sys_Module item in list.Where(o => o.ParentId == 0).OrderBy(o => o.OrderNo))
                  { %>
                <div title="【<%= item.ModuleName %>】">
                    <%foreach (Bangle.Model.Sys_Module item2 in list.Where(o => o.ParentId == item.ModuleId).OrderBy(o => o.OrderNo))
                      {%>
                    <p onclick='AddTabs("<%= item2.Href %>","<%=item2.ModuleName %>")'>
                        <%= item2.ModuleName %>
                    </p>
                    <%} %>
                </div>
                <%} %>
            </div>
        </div>
        <div data-options="region:'center'" style="overflow: hidden;">
            <div id="MainWindow" class="easyui-tabs" data-options="fit:true,border:false">
                <div title="首页" style="overflow: hidden;">
                    <iframe src="/Main/Index.aspx" frameborder="0" width="100%" height="100%"></iframe>
                </div>
            </div>
        </div>
        <div id="ModifyPassword" style="overflow: hidden;">
            <iframe src="Login/ModifyPassword.aspx" frameborder="0" width="100%" height="100%" scrolling="no"></iframe>
        </div>
        <div id="AboutBangle" class="easyui-dialog" title="关于系统" data-options="modal:true,closed:true" style="padding: 30px;">
            <div style="font-size: 16px;">
                <p>系统名称：深圳安盛宇电子有限公司系统平台</p>
                <p>系统版本：1.0.0</p>
                <p>技术支持：<b style="color: #0000ff">@大角Bangle</b></p>
            </div>
        </div>
    </form>
</body>
</html>

